/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyClass;

import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.TiledLayer;

/**
 *
 * @author HuuTai_it
 */
public class Information extends TiledLayer {
    
    public Information (Image diffImage) throws Exception {
        
        super(14, 3, diffImage, 15, 20);     
        
        for (int row = 0; row < 3; row++)                
            for (int col = 0; col < 14; col++)
                setCell(col, row, 0);
        
        setPosition(20, 260); 
    }
    
    public void setLevel (int d) {
        
        setCell(0, 0, d / 10 + 1);
        setCell(1, 0, d % 10 + 1);
    }
    
    public void setLife (int d) {
        
        setCell(4, 1, d / 10 + 1);
        setCell(5, 1, d % 10 + 1);
    }
    
    public void setScores (int d) {
        
        setCell(13, 0, d / 1000 + 1);
        setCell(12, 0, d % 1000 + 1);
        setCell(11, 0, d % 100 + 1 );
        setCell(10, 0, d % 10 + 1);
    }
    
}
